using System;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json;

using MarketPlace.Data.Bases;

namespace MarketPlace.Data.DomainModels
{
    [JsonObject(MemberSerialization.OptIn)]
    public partial class Company : BusinessBase<long>
    {
        #region Declarations

		private string _name = String.Empty;
		private string _province = String.Empty;
		private string _city = String.Empty;
		private string _address = String.Empty;
		private string _webSite = null;
		
		
		private IList<ContactInfo> _contactInfos = new List<ContactInfo>();
		
		#endregion

        #region Constructors

        public Company() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            
            sb.Append(this.GetType().FullName);
			sb.Append(_name);
			sb.Append(_province);
			sb.Append(_city);
			sb.Append(_address);
			sb.Append(_webSite);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

        [JsonProperty]
		public virtual string Name
        {
            get { return _name; }
			set
			{
				OnNameChanging();
				_name = value;
				OnNameChanged();
			}
        }
		partial void OnNameChanging();
		partial void OnNameChanged();
		
        [JsonProperty]
		public virtual string Province
        {
            get { return _province; }
			set
			{
				OnProvinceChanging();
				_province = value;
				OnProvinceChanged();
			}
        }
		partial void OnProvinceChanging();
		partial void OnProvinceChanged();
		
        [JsonProperty]
		public virtual string City
        {
            get { return _city; }
			set
			{
				OnCityChanging();
				_city = value;
				OnCityChanged();
			}
        }
		partial void OnCityChanging();
		partial void OnCityChanged();
		
        [JsonProperty]
		public virtual string Address
        {
            get { return _address; }
			set
			{
				OnAddressChanging();
				_address = value;
				OnAddressChanged();
			}
        }
		partial void OnAddressChanging();
		partial void OnAddressChanged();
		
        [JsonProperty]
		public virtual string WebSite
        {
            get { return _webSite; }
			set
			{
				OnWebSiteChanging();
				_webSite = value;
				OnWebSiteChanged();
			}
        }
		partial void OnWebSiteChanging();
		partial void OnWebSiteChanged();
		
		public virtual IList<ContactInfo> ContactInfos
        {
            get { return _contactInfos; }
            set
			{
				OnContactInfosChanging();
				_contactInfos = value;
				OnContactInfosChanged();
			}
        }
		partial void OnContactInfosChanging();
		partial void OnContactInfosChanged();
		
        #endregion
    }
}
